package model

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(60)" json:"username"`
	Password string `gorm:"type:varchar(60)" json:"password"`
}

type UserRole struct {
	gorm.Model
	Uid int `gorm:"type:int" json:"uid"`
	Rid int `gorm:"type:int" json:"rid"`
}

type Role struct {
	gorm.Model
	Name string `gorm:"type:varchar(60)" json:"name"`
}

type RoleNode struct {
	gorm.Model
	Rid int `gorm:"type:int" json:"rid"`
	Nid int `gorm:"type:int" json:"nid"`
}

type Node struct {
	gorm.Model
	Name string `gorm:"type:varchar(60)" json:"name"`
}

type Path struct {
	gorm.Model
	PathCode string `gorm:"type:varchar(60)" json:"path_code"`
	PathName string `gorm:"type:varchar(60)" json:"path_name"`
	PathArea string `gorm:"type:varchar(60)" json:"path_area"`
}

type PathOrder struct {
	gorm.Model
	OrderCode  string `gorm:"type:varchar(60)" json:"order_code"`
	OrderNum   int    `gorm:"type:int" json:"order_num"`
	OrderPrice int    `gorm:"type:int" json:"order_price"`
	Pid        int    `gorm:"type:int" json:"pid"`
}
type PathOrderList struct {
	PathOrderId int    `gorm:"type:int" json:"path_order_id"`
	PathCode    string `gorm:"type:varchar(60)" json:"path_code"`
	PathName    string `gorm:"type:varchar(60)" json:"path_name"`
	PathArea    string `gorm:"type:varchar(60)" json:"path_area"`
	OrderCode   string `gorm:"type:varchar(60)" json:"order_code"`
	OrderNum    int    `gorm:"type:int" json:"order_num"`
	OrderPrice  int    `gorm:"type:int" json:"order_price"`
}
